package chixing.day09.homework.work6;

import chixing.day07.inherited.Product;

//OnlineOrder含配送费用
public class OnlineOrder  extends Order {
    private double addPrice;//配送费
    public OnlineOrder(){}
    public OnlineOrder(double addPrice) {
        this.addPrice = addPrice;
    }
    public OnlineOrder(String orderId, double orderPrice, double addPrice) {
        super(orderId, orderPrice);
        this.addPrice = addPrice;
    }

    @Override
    public void getOrderType() {
        System.out.println("含配送费");
    }

    public double getAddPrice() {
        return addPrice;
    }

    public void setAddPrice(double addPrice) {
        this.addPrice = addPrice;
    }

    @Override
    public String toString() {
        return "OnlineOrder{" +
                "addPrice=" + addPrice +
                '}';
    }
}
